<#include "header.ftl">
<#-- 首页  -->
<script type="text/javascript" src="../../resources/js/showAll.js"></script>

<div class="g-doc" ng-controller="showAllCtrl">
    <div class="m-tab m-tab-fw m-tab-simple f-cb">
        <div class="tab">
            <ul>
                <li ><a href="/" ng-if ="userOfLoger.name == 'buyer' && type==1" >所有内容</a></li>
                <li class="z-sel" ng-if = "userOfLoger.name==null||(userOfLoger.name == 'buyer' && type!=1)" ><a href="/">所有内容</a></li>
                <li ng-if = "userOfLoger.name == 'buyer' && type!=1" ><a href="/?type=1">未购买的内容</a></li>
           		<li ng-if = "userOfLoger.name == 'buyer' && type==1"  class="z-sel"><a href="/?type=1">未购买的内容</a></li>
            </ul>
        </div>
    </div>
    
    <div class="n-plist">
     <ul class="f-cb" >
     	<li id="p-{{item.id}}" ng-repeat = "item in commodity">
                    <a href="/show?id={{item.id}}" class="link">
                        <div class="img"><img src="{{item.picture}}" alt="OK"></div>
                        <h3 ng-bind="item.name" ></h3>
                        <div class="price"><span class="v-unit">¥</span><span class="v-value" ng-bind="item.price"></span></div>
                        <span class="had" ng-if="userOfLoger.name == 'buyer' && item.isSelled == true"><b>已购买</b></span>
                        <span class="had" ng-if="userOfLoger.name == 'seller' && item.isSelled == true"><b>已售出</b></span>
                        </a>
                     <span class="u-btn u-btn-normal u-btn-xs del" ng-if="userOfLoger.name == 'seller'&& item.isSelled == false" ng-click="deleteCommModal(item.id)">删除</span>
                   
                </li>
     </ul>
 </div>
  <div class="modal fade" id="modalid-add-delete">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">提示信息</h4>
                </div>
                <div class="modal-body">
                    <p>确认删除吗?</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="deleteComm()">确定</button>
                    <button type="button" class="btn btn-danger" data-dismiss="modal">取消</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
 </div>
     
<#include "footer.ftl">